summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2024-01-07 06:49:52 +0100
committergerman77 <juangerman-13@hotmail.com>2024-01-07 06:49:52 +0100
commit0b4cc6e14c724a48a4f08814261c61b201a693e5 (patch)
tree56087b0e2523c38097216f42bb985ef40d3c7ed7
parentMerge pull request #12596 from german77/hid_qlaunch (diff)
downloadyuzu-0b4cc6e14c724a48a4f08814261c61b201a693e5.tar
yuzu-0b4cc6e14c724a48a4f08814261c61b201a693e5.tar.gz
yuzu-0b4cc6e14c724a48a4f08814261c61b201a693e5.tar.bz2
yuzu-0b4cc6e14c724a48a4f08814261c61b201a693e5.tar.lz
yuzu-0b4cc6e14c724a48a4f08814261c61b201a693e5.tar.xz
yuzu-0b4cc6e14c724a48a4f08814261c61b201a693e5.tar.zst
yuzu-0b4cc6e14c724a48a4f08814261c61b201a693e5.zip
-rw-r--r--src/hid_core/resources/npad/npad.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hid_core/resources/npad/npad.cpp b/src/hid_core/resources/npad/npad.cpp
index e6c035628..97f31d26e 100644
--- a/src/hid_core/resources/npad/npad.cpp
+++ b/src/hid_core/resources/npad/npad.cpp
@@ -870,6 +870,11 @@ void NPad::InitializeVibrationDevice(
const auto aruid = applet_resource_holder.applet_resource->GetActiveAruid();
const auto npad_index = static_cast<Core::HID::NpadIdType>(vibration_device_handle.npad_id);
const auto device_index = static_cast<std::size_t>(vibration_device_handle.device_index);
+
+ if (aruid == 0) {
+ return;
+ }
+
InitializeVibrationDeviceAtIndex(aruid, npad_index, device_index);
}